#include "settingwidget.h"
#include "ui_settingwidget.h"

SettingWidget::SettingWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SettingWidget)
{
    ui->setupUi(this);
    this->setWindowTitle("游戏设置");
    this->setWindowIcon(QIcon(GAME_ICON));

    QButtonGroup *map_group = new QButtonGroup(this);
    QButtonGroup *player_plane_group = new QButtonGroup(this);

    map_group->addButton(ui->map_button_1);
    map_group->addButton(ui->map_button_2);
    map_group->addButton(ui->map_button_3);
    player_plane_group->addButton(ui->playerplane_button_1);
    player_plane_group->addButton(ui->playerplane_button_2);
    player_plane_group->addButton(ui->playerplane_button_3);
}

SettingWidget::~SettingWidget()
{
    delete ui;
}

void SettingWidget::on_map_button_1_toggled(bool checked)
{
    map_path = 1;
}

void SettingWidget::on_map_button_2_toggled(bool checked)
{
    map_path = 2;
}

void SettingWidget::on_map_button_3_toggled(bool checked)
{
    map_path = 3;
}

void SettingWidget::on_playerplane_button_1_toggled(bool checked)
{
    player_path = 1;
}

void SettingWidget::on_playerplane_button_2_toggled(bool checked)
{
    player_path = 2;
}

void SettingWidget::on_playerplane_button_3_toggled(bool checked)
{
    player_path = 3;
}

